home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C/C++ Users Group Library 1996 July
/
C-C++ Users Group Library July 1996.iso
/
vol_300
/
335_01
/
as6502.txt
< prev
next >
Wrap
Text File
|
1990-12-02
|
17KB
|
727 lines
- 1 -
A. Appendix_for_as6502_Frankenstein_Assembler
A.1 Pseudo_Operations
A.1.1 Standard_Pseudo_Operation_Mnemonics
End END
File Inclusion INCL INCLUDE
If IF
Else ELSE
End If ENDI
Equate EQU
Set SET
Org ORG
Reserve Memory RESERVE RMB
Define Byte Data BYTE DB FCB
Define Word Data DW FDB WORD
Define String Data FCC STRING
Define Character Set Translation CHARSET
Define Character Value CHARDEF CHD
Use Character Translation CHARUSE
A.1.2 Machine_Dependent_Pseudo_Operations
A.1.2.1 Define_Word_Data The define word pseudo-operations
generates the byte reversed (low byte, high byte)
representation.
A.1.2.2 Instruction_Set_Selection
CPU string
The instruction set can be specified in the source file with
the CPU pseudooperation. The string, delimited by quotes or
apostrophes, is scanned for a substring which selects which
instruction set is used. When the program is invoked, this
operation is performed on the name of the program, then the
-p optional arguement, if any, and then any CPU statements.
The last one selects which subset of the instructions the
assembler will accept. The instruction set can be changed
at any place in the source file.
Instruction Set Substrings
ROCKWELL CMOS R65C r65c
CMOS 65C 65c
ROCKWELL Extended R65 r65
R65C00/21 21
Standard NMOS 65
- 2 -
A.2 Instructions
A.2.1 Instruction_List
Opcode Syntax Selection Criteria
ADC '#' topexpr
ADC '(' topexpr ')' ',' INDEX DIRECT INDEXY
ADC '(' topexpr ')' DIRECT INSTCMOS
ADC '(' topexpr ',' INDEX ')' DIRECT INDEXX
ADC topexpr ',' INDEX DIRECT INDEXX
ADC topexpr ',' INDEX EXTENDED INDEXX
ADC topexpr ',' INDEX INDEXY
ADC topexpr DIRECT
ADC topexpr EXTENDED
AND '#' topexpr
AND '(' topexpr ')' ',' INDEX DIRECT INDEXY
AND '(' topexpr ')' DIRECT INSTCMOS
AND '(' topexpr ',' INDEX ')' DIRECT INDEXX
AND topexpr ',' INDEX DIRECT INDEXX
AND topexpr ',' INDEX EXTENDED INDEXX
AND topexpr ',' INDEX INDEXY
AND topexpr DIRECT
AND topexpr EXTENDED
ASL ACCUM
ASL topexpr ',' INDEX DIRECT INDEXX
ASL topexpr ',' INDEX EXTENDED INDEXX
ASL topexpr DIRECT
ASL topexpr EXTENDED
BBR0 topexpr ',' topexpr INSTROCKWELL
BBR1 topexpr ',' topexpr INSTROCKWELL
BBR2 topexpr ',' topexpr INSTROCKWELL
BBR3 topexpr ',' topexpr INSTROCKWELL
BBR4 topexpr ',' topexpr INSTROCKWELL
BBR5 topexpr ',' topexpr INSTROCKWELL
BBR6 topexpr ',' topexpr INSTROCKWELL
BBR7 topexpr ',' topexpr INSTROCKWELL
- 3 -
Opcode Syntax Selection Criteria
BBS0 topexpr ',' topexpr INSTROCKWELL
BBS1 topexpr ',' topexpr INSTROCKWELL
BBS2 topexpr ',' topexpr INSTROCKWELL
BBS3 topexpr ',' topexpr INSTROCKWELL
BBS4 topexpr ',' topexpr INSTROCKWELL
BBS5 topexpr ',' topexpr INSTROCKWELL
BBS6 topexpr ',' topexpr INSTROCKWELL
BBS7 topexpr ',' topexpr INSTROCKWELL
BCC topexpr
BCS topexpr
BEQ topexpr
BGE topexpr
BIT '#' topexpr INSTCMOS
BIT topexpr ',' INDEX DIRECT INDEXX INSTCMOS
BIT topexpr ',' INDEX EXTENDED INDEXX INSTCMOS
BIT topexpr DIRECT
BIT topexpr EXTENDED
BLT topexpr
BMI topexpr
BNE topexpr
BPL topexpr
BRA topexpr INST21
BRA topexpr INSTCMOS
BRK '#' topexpr
BRK
BVC topexpr
BVS topexpr
- 4 -
Opcode Syntax Selection Criteria
CLC
CLD
CLI
CLV
CMP '#' topexpr
CMP '(' topexpr ')' ',' INDEX DIRECT INDEXY
CMP '(' topexpr ')' DIRECT INSTCMOS
CMP '(' topexpr ',' INDEX ')' DIRECT INDEXX
CMP topexpr ',' INDEX DIRECT INDEXX
CMP topexpr ',' INDEX EXTENDED INDEXX
CMP topexpr ',' INDEX INDEXY
CMP topexpr DIRECT
CMP topexpr EXTENDED
CPX '#' topexpr
CPX topexpr DIRECT
CPX topexpr EXTENDED
CPY '#' topexpr
CPY topexpr DIRECT
CPY topexpr EXTENDED
DEC ACCUM INSTCMOS
DEC topexpr ',' INDEX DIRECT INDEXX
DEC topexpr ',' INDEX EXTENDED INDEXX
DEC topexpr DIRECT
DEC topexpr EXTENDED
DEX
DEY
EOR '#' topexpr
EOR '(' topexpr ')' ',' INDEX DIRECT INDEXY
EOR '(' topexpr ')' DIRECT INSTCMOS
EOR '(' topexpr ',' INDEX ')' DIRECT INDEXX
EOR topexpr ',' INDEX DIRECT INDEXX
EOR topexpr ',' INDEX EXTENDED INDEXX
EOR topexpr ',' INDEX INDEXY
EOR topexpr DIRECT
EOR topexpr EXTENDED
- 5 -
Opcode Syntax Selection Criteria
INC ACCUM INSTCMOS
INC topexpr ',' INDEX DIRECT INDEXX
INC topexpr ',' INDEX EXTENDED INDEXX
INC topexpr DIRECT
INC topexpr EXTENDED
INX
INY
JMP '(' topexpr ')'
JMP '(' topexpr ',' INDEX ')' INSTCMOS INDEXX
JMP topexpr
JSR topexpr
LDA '#' topexpr
LDA '(' topexpr ')' ',' INDEX DIRECT INDEXY
LDA '(' topexpr ')' DIRECT INSTCMOS
LDA '(' topexpr ',' INDEX ')' DIRECT INDEXX
LDA topexpr ',' INDEX DIRECT INDEXX
LDA topexpr ',' INDEX EXT